export default [
    {
        name: 'BaseIndex',
        path: 'base/index',
        component: () => import('@/components/business/base/Index.vue'),
        meta: {
            auth: true
        },
        // beforeEnter: async (to, from, next) => {
        //     //  获取目标地址的登录认证是否存在
        //     if (to.meta.auth && localStorage.getItem('LoginAuth')) {
        //         let LoginAuth = JSON.parse(localStorage.getItem('LoginAuth'))
        //         let { mobile, id: busid } = LoginAuth
        //         let res = await ApiList.check({ mobile, busid })
        //         if(res.code == 0){
        //             showNotify({
        //                 type:'warning',
        //                 message:res.msg,
        //             })
        //             localStorage.removeItem('LoginAuth')
        //             next('/business/base/login')
        //         }else{
        //             console.log(res.data);
        //             localStorage.setItem('LoginAuth',JSON.stringify(res.data))
        //             next()
        //         }
        //     } else {
        //         showToast({
        //             type: 'fail',
        //             message: '请先登录',
        //         })
        //         next('/business/base/login')
        //     }
        // }
    },
    {
        name: 'BaseLogin',
        path: 'base/login',
        component: () => import('@/components/business/base/Login.vue')
    },
    {
        name: 'BaseRegister',
        path: 'base/register',
        component: () => import('@/components/business/base/Register.vue')
    },
    {
        path: 'base/profile',
        name: 'BaseProfile',
        component: () => import('components/business/base/Profile.vue'),
        meta: {
            // 需要登录认证
            auth: true
        },
    },
    {
        path: 'base/email',
        name: 'BaseEmail',
        component: () => import('components/business/base/Email.vue'),
        meta: {
            // 需要登录认证
            auth: true
        },
    },
    {
        path: 'base/collection',
        name: 'BaseCollection',
        component: () => import('components/business/base/Collection.vue'),
        meta: {
            // 需要登录认证
            auth: true
        },
    },
    {
        path: 'base/recharge',
        name: 'BaseRecharge',
        component: () => import('components/business/base/Recharge.vue'),
        meta: {
            // 需要登录认证
            auth: true
        },
    },
]